1. Field of the Invention
The present invention relates to an image retrieval apparatus and method of retrieving an image.
2. Description of the Related Art
Conventionally, various techniques of retrieving an image have been proposed. Many similar image retrieval techniques for natural images, which are put into practice to some extent, use color information as an image feature amount. Most of these techniques calculate the histogram associated with color information and retrieve an image using the RGB ratio or combination of majority colors in images.
In these techniques, however, the retrieval accuracies are not always high because positional information of colors is lost. For example, Japanese Patent Laid-Open No. 8-249349 discloses pattern matching using feature amounts (representative colors) of a plurality of blocks obtained by segmenting each image. With this technique, however, the distance in feature amount between blocks of two images to be matched must be calculated, so an enormous amount of calculation is required. Especially, when representative colors are used as feature amounts, three data, i.e., R, G, and B data must be handled, and calculation becomes more complex. In addition, since the feature amounts themselves are used to compare images, similar image retrieval is disabled only when the image angle or object position changes although the comparison accuracy rises. More specifically, appropriate image retrieval while ensuring some degree of ambiguity by absorbing some difference in image feature amount due to a change in image angle or object position or photographing conditions, i.e., so-called robust similar image retrieval cannot be performed.
When a natural image is to be retrieved using the conventional technique, normally, keywords are added to images in advance, and image retrieval is performed on the basis of the keywords. However, keyword addition is labor-intensive. Additionally, an image having no keyword must be manually selected by displaying thumbnail images, resulting in cumbersome retrieval.
The present invention has been made in consideration of the above problem, and has as its object to provide an image retrieval apparatus and method which allow high-speed similar image retrieval in consideration of the image feature amount arrangement.
It is another object of the present invention to provide an image retrieval apparatus and method which allow similar image retrieval by effectively absorbing a change in image due to a variation in photographing condition such as a photographing angle or photographing magnification.
In order to achieve the above objects, according to an aspect of the present invention, there is provided an image retrieval apparatus comprising addition means for segmenting an image into a plurality of blocks and adding a label to a feature amount acquired in correspondence with each block, generation means for arranging labels added by the addition means on the basis of a predetermined block sequence to generate a label string, storage means for storing the label string generated by the generation means in correspondence with the image, and retrieval means for performing image retrieval on the basis of the label string stored in the storage means.
According to another aspect of the present invention, in the image retrieval apparatus, the label string represents a two-dimensional label matrix, and the retrieval means comprises first matching means for making a label string extracted from a label matrix of a retrieval specified image in units of rows correspond to a label string extracted from a label matrix of an image to be compared in units of rows by Dynamic Programming (DP) matching to obtain a row array of the image to be compared, and second matching means for obtaining, by DP matching, a similarity between a row array of the retrieval specified image and the row array obtained by the first matching means.
With this arrangement, two-dimensional DP matching can be performed.
It is still another object of the present invention to enable quick similar image retrieval by representing a feature amount group by one symbol and calculating the similarity between labels to reduce the similarity calculation amount.
It is still another object of the present invention to perform satisfactory similar image retrieval by representing similar feature amounts by one label.
It is still another object of the present invention to more effectively perform similar image retrieval by applying a technique such as DP matching or fuzzy nondeterministic automaton which allows certain ambiguity in label positions.
Other features and advantages of the present invention will be apparent from the following description taken in conjunction with the accompanying drawings, in which like reference characters designate the same or similar parts throughout the figures thereof.